package com.controller;

import com.entity.pojo.SystemUser;
import com.service.SystemUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
@RequestMapping("SystemUser")
public class SystemUserController {

    @Autowired
    private SystemUserService systemUserService;
    @RequestMapping("/all")
    public String all(Model model){
        List<SystemUser> all = systemUserService.findAll();
        model.addAttribute("list",all);
        return "SystemUser";
    }
}
